<?php
namespace Utuo;

class Sign {
	
	private static $secret = "65w&*r!#45^2w15w#\$rr7";
	
	public static function create( $param ) {
		ksort($param);
		$str =  "";
		foreach ( $param as $k=>$v) {
			$str.=$k."=".$v."&";
		}
		$str.=self::$secret;
		return md5(md5($str));
	}
	
	public static function verify( $param, $sign ) {
		return self::create($param) == $sign;
	}
	
}